﻿using UnityEngine;
using System.Collections;

public class MapEffectLight{

    static Light light;

    static public Light GetLight()
    {
        return light;
    }

    static public void SetMapEffectLight()
    {
        if (light == null)
        {
            GameObject lightObj = new GameObject("MapEffectLight");
            lightObj.transform.position = Vector3.zero;
            lightObj.transform.rotation = Quaternion.Euler(new Vector3(45.0f,0,0));
            light = lightObj.AddComponent<Light>();
            light.type = LightType.Directional;
            light.intensity = 0.5f;
            light.cullingMask = 1 << LayerMask.NameToLayer("MapEffect");
        }
    }
}
